/*
 * Copyright 2010, 2011, 2012 mapsforge.org
 *
 * This program is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.mapsforge.android.maps.overlay;

import org.mapsforge.android.maps.Projection;

import android.graphics.Canvas;
import android.graphics.Point;

/**
 * KMLOverlay class extends the abstract base class Overlay to handle an additional ID. In fact it will behave and may
 * be an instance of any Overlay class representing ways, points, circles, etc. But adding that ID contained in the KML
 * Object that generated the particular Overlay. It also provides methods to acess to taht ID.
 * 
 * @author art
 */
public class KMLOverlay extends Overlay {

	private String id;

	/**
	 * Default Constructor. No parameter, the ID is set to null.
	 */
	public KMLOverlay() {
		super();
		this.id = null;
	}

	/**
	 * Parameter constructor.
	 * 
	 * @param _id
	 *            An identifier. This has to be the Object id in the kml file that identifies the placemark object. This
	 *            may be used in order to backtrack objects for an eventual APP that use this library as a generic
	 *            viewer called by third APPs.
	 */
	public KMLOverlay(String _id) {
		super();
		this.id = _id;
	}

	@Override
	protected void drawOverlayBitmap(Canvas canvas, Point drawPosition, Projection projection, byte drawZoomLevel) {
		// TODO Auto-generated method stub
		super.draw(canvas);

	}

	/**
	 * Set the Overlay Identifier.
	 * 
	 * @param id
	 *            An identifier. This has to be the Object id in the kml file that identifies the placemark object. This
	 *            may be used in order to backtrack objects for an eventual APP that use this library as a generic
	 *            viewer called by third APPs.
	 */
	public void setID(String id) {
		// TODO Auto-generated method stub
		this.id = id;
	}

	/**
	 * @return A String value representing an identifier. This has to be the Object id in the kml file that identifies a
	 *         placemark object. Beware it might be null.
	 */
	public String getID() {
		return this.id;
	}
}
